package repository

import (
	"context"

	"Data-API-MCP/backend/internal/domain/entity"
)

// MCPServiceRepository MCP服务仓库接口
type MCPServiceRepository interface {
	// CreateService 创建服务
	CreateService(ctx context.Context, service *entity.MCPService) error

	// GetService 获取服务
	GetService(ctx context.Context, id int64) (*entity.MCPService, error)

	// ListServices 获取服务列表
	ListServices(ctx context.Context) ([]*entity.MCPService, error)

	// UpdateService 更新服务
	UpdateService(ctx context.Context, service *entity.MCPService) error

	// DeleteService 删除服务
	DeleteService(ctx context.Context, id int64) error

	// GetServiceStatus 获取服务状态
	GetServiceStatus(ctx context.Context, id int64) (*entity.ServiceStatus, error)

	// GetServiceMetrics 获取服务指标
	GetServiceMetrics(ctx context.Context, id int64) (*entity.ServiceMetrics, error)

	// GetServiceLogs 获取服务日志
	GetServiceLogs(ctx context.Context, id int64) ([]*entity.ServiceLog, error)

	// GetServiceConfig 获取服务配置
	GetServiceConfig(ctx context.Context, id int64) (map[string]interface{}, error)

	// UpdateServiceConfig 更新服务配置
	UpdateServiceConfig(ctx context.Context, id int64, config map[string]interface{}) error

	// ReloadService 重载服务
	ReloadService(ctx context.Context, id int64) error

	// CreateServiceParam 创建服务参数
	CreateServiceParam(ctx context.Context, param *entity.MCPServiceParam) error

	// GetServiceParams 获取服务参数列表
	GetServiceParams(ctx context.Context, serviceID string) ([]*entity.MCPServiceParam, error)

	// UpdateServiceParam 更新服务参数
	UpdateServiceParam(ctx context.Context, param *entity.MCPServiceParam) error

	// DeleteServiceParam 删除服务参数
	DeleteServiceParam(ctx context.Context, id string) error

	// CreateServiceVersion 创建服务版本
	CreateServiceVersion(ctx context.Context, version *entity.MCPServiceVersion) error

	// GetServiceVersion 获取服务版本
	GetServiceVersion(ctx context.Context, id string) (*entity.MCPServiceVersion, error)

	// GetServiceVersions 获取服务版本列表
	GetServiceVersions(ctx context.Context, serviceID string) ([]*entity.MCPServiceVersion, error)

	// UpdateServiceVersion 更新服务版本
	UpdateServiceVersion(ctx context.Context, version *entity.MCPServiceVersion) error

	// DeleteServiceVersion 删除服务版本
	DeleteServiceVersion(ctx context.Context, id string) error

	// ActivateServiceVersion 激活服务版本
	ActivateServiceVersion(ctx context.Context, serviceID, versionID string) error
}
